package com.rt.tmpt.dto;

import com.inspiresoftware.lib.dto.geda.annotations.Dto;
import com.inspiresoftware.lib.dto.geda.annotations.DtoField;
import lombok.Data;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;

@Data
@Dto("com.rt.tmpt.bean.A1TemplateColumn")
public class A1TemplateColumnDto  implements Serializable{
	private static final long serialVersionUID = 1L;

	public static final int dataResource_Normal = 0;
	public static final int dataResource_ColumnOptionData = 1;//数据字典
	public static final int dataResource_Sql = 2;
	public static final int dataResource_Page = 3;
	public static final int dataResource_OptionsTableKeyEqualValue = 4;
	public static final int dataResource_OptionsTable = 5;

	@DtoField
	private Long id;
	@DtoField
	private String columnName;
	@DtoField
	private String columnShowName;
	@DtoField
	private String comment;
	@DtoField
	private Integer columnWidth;
	@DtoField
	private String tableAliasName;//如果不存在，就取table里的这个字段
	@DtoField
	private String columnNameSql;
	@DtoField
	private String columnNameSqlSum;
	@DtoField
	private Integer isFrozenColumn;
	@DtoField
	private Integer needSum; // 1:合计列，2:columnNameSqlSum写汉字页面显示
	@DtoField
	private Integer sort;
	@DtoField
	private Integer isHidden;
	@DtoField
	private Integer canAdd;//1:这个字段可以通过页面添加值
	@DtoField
	private Integer isQuery;//作为查询条件之一
	@DtoField
	private String queryType;
	@DtoField
	private Integer isSortColumn;//作为排序属性条件之一
	@DtoField
	private String columnType;//列类型：页面生成不同的输入框,PS:date, 页面用日期框，time,页面用时间框，datetime,页面用时间日期框
	@DtoField
	private Integer dataResource;//数据来源，默认0正常来源，1：取配置数据，2，来SQL执行数据，3，取自定义页面数据
	@DtoField
	private String optionsSql;//select id as key,name as value from table1 where deleteFlag=0
	@DtoField
	private String optionsPage;//zpmng/admin123/right_v2/getCompanyDeptTree
	@DtoField
	private String defaultValue;

	@DtoField
	private Integer lineWidth4AddDialog ;
	@DtoField
	private Integer inputWidth4AddDialog ;
	@DtoField
	private Integer required4AddDialog ;
	@DtoField
	private String dataOptions4AddDialog ;
	@DtoField
	private String style4AddDialog ;


	@DtoField
	private Integer chartType;//1: as categories 2: as dataset
	@DtoField
	private String columnDataType;
	@DtoField
	private String columnTip;
	@DtoField
	private String dataTransfer;
	@DtoField
	private String columnLayoutStyle4adddialog;


	@DtoField
	private Integer deleteFlag ;//default0,1已删除
	@DtoField(readOnly=true)
	private Timestamp createDate ;
	@DtoField
	private Timestamp modifyDate ;
	@DtoField
	private String createMan ;
	@DtoField
	private String modifyMan ;

	private String queryTypePlaceholder;
	private Integer hasOptions;//有多选项select?
	private String defaultKey;

	private List<A1TemplateColumnOptionDto> a1TemplateColumnOptionDtoList = new ArrayList<A1TemplateColumnOptionDto>();
	private String a1TemplateColumnOptionJsonArray;
	private String a1TemplateColumnOptionJsonArray4Conditin;


}
